package me.weijing.common.http;

import java.net.HttpURLConnection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import android.app.Activity;
import android.content.Context;

public abstract class WeiJingResourceAsyncHttpRequestbase extends ResourceAsyncHttpRequestBase {

    public static Class<?> logoutedActivity;

    public static Class<?> getLogoutedActivity() {
        return logoutedActivity;
    }

    public static void setLogoutedActivity(Class<?> logoutedActivity) {
    }

    public WeiJingResourceAsyncHttpRequestbase(Context context) {
        super(context);

    }

    @Override
    public Map<String, String> getExtraUrlParam() {
        Map<String, String> params = new ConcurrentHashMap<String, String>();
        return params;
    }

    @Override
    public void processFailed(EFailType failType, int resultCode, String errMsg) {
        if (failType == EFailType.EFAILTYPE_APP && HttpURLConnection.HTTP_UNAUTHORIZED == resultCode) {
            if (Activity.class.isInstance(mContext) && !((Activity) mContext).isFinishing()) {
            }

        } else {
            if (Activity.class.isInstance(mContext) && !((Activity) mContext).isFinishing()) {
            }
        }
    }

    @Override
    public void processResult(String cacheFilePath) {

    }

    @Override
    public void launchProgress() {

    }

    @Override
    public void processCanceled() {

    }

    @Override
    public void publishProgress(int progress) {

    }

    @Override
    public void processFinish() {

    }

}
